package com.guchenbo.scala

/**
 * @author guchenbo
 * @date 2022/3/16
 */
object ForDemo {

  def main(args: Array[String]): Unit = {
    //    九九乘法表
    for (i <- 1 to 9) {
      for (j <- 1 to i) {
        print(s"$j x $i = ${j * i}" + "\t\t")
      }
      println()
    }
    Helper.div()
    //    简写
    for (i <- 1 to 9; j <- 1 to i) {
      print(s"$j x $i = ${j * i}" + "\t\t")
      if (i == j) println()
    }
  }

}

class Student{}
